package com.ruoyi.ring.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.ring.domain.RingBloodOxygen;
import com.ruoyi.ring.mapper.RingBloodOxygenMapper;
import com.ruoyi.ring.service.IRingBloodOxygenService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 血氧Service业务层处理
 * 
 * @author liuwp
 * @date 2025-08-18
 */
@Service
public class RingBloodOxygenServiceImpl implements IRingBloodOxygenService 
{
    @Resource
    private RingBloodOxygenMapper ringBloodOxygenMapper;

    /**
     * 查询血氧
     * 
     * @param id 血氧主键
     * @return 血氧
     */
    @Override
    public RingBloodOxygen selectRingBloodOxygenById(Long id)
    {
        return ringBloodOxygenMapper.selectRingBloodOxygenById(id);
    }

    /**
     * 查询血氧列表
     * 
     * @param ringBloodOxygen 血氧
     * @return 血氧
     */
    @Override
    public List<RingBloodOxygen> selectRingBloodOxygenList(RingBloodOxygen ringBloodOxygen)
    {
        return ringBloodOxygenMapper.selectRingBloodOxygenList(ringBloodOxygen);
    }

    /**
     * 根据业务主键查询一条记录：血氧
     *
     * @param ringBloodOxygen 血氧
     * @return 血氧
     */
    @Override
    public RingBloodOxygen selectOneRingBloodOxygen(RingBloodOxygen ringBloodOxygen)
    {
        return ringBloodOxygenMapper.selectOneRingBloodOxygen(ringBloodOxygen);
    }

    /**
     * 新增血氧
     * 
     * @param ringBloodOxygen 血氧
     * @return 结果
     */
    @Override
    public int insertRingBloodOxygen(RingBloodOxygen ringBloodOxygen)
    {
        ringBloodOxygen.setCreateTime(DateUtils.getNowDate());
        return ringBloodOxygenMapper.insertRingBloodOxygen(ringBloodOxygen);
    }

    /**
     * 修改血氧
     * 
     * @param ringBloodOxygen 血氧
     * @return 结果
     */
    @Override
    public int updateRingBloodOxygen(RingBloodOxygen ringBloodOxygen)
    {
        ringBloodOxygen.setUpdateTime(DateUtils.getNowDate());
        return ringBloodOxygenMapper.updateRingBloodOxygen(ringBloodOxygen);
    }

    @Override
    public int updateRingBloodOxygenCondition(RingBloodOxygen ringBloodOxygen, RingBloodOxygen ringBloodOxygenCondition)
    {
                ringBloodOxygen.setUpdateTime(DateUtils.getNowDate());
        return ringBloodOxygenMapper.updateRingBloodOxygenCondition(ringBloodOxygen, ringBloodOxygenCondition);
    }

    /**
     * 批量删除血氧
     * 
     * @param ids 需要删除的血氧主键
     * @return 结果
     */
    @Override
    public int deleteRingBloodOxygenByIds(Long[] ids)
    {
        return ringBloodOxygenMapper.deleteRingBloodOxygenByIds(ids);
    }

    /**
     * 删除血氧信息
     * 
     * @param id 血氧主键
     * @return 结果
     */
    @Override
    public int deleteRingBloodOxygenById(Long id)
    {
        return ringBloodOxygenMapper.deleteRingBloodOxygenById(id);
    }

    /**
     * 条件删除血氧
     *
     * @param ringBloodOxygen 血氧
     * @return 结果
     */
    @Override
    public int deleteRingBloodOxygenByCondition(RingBloodOxygen ringBloodOxygen)
    {
        return ringBloodOxygenMapper.deleteRingBloodOxygenByCondition(ringBloodOxygen);
    }

}
